package cn.dlc.com.base.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: dlc
 * @Date: 2021/8/4 - 17:40
 * 通用的数据库实体类
 */
@Data
@ApiModel("通用响应参数")
public class BaseEntity {

    @TableField("created_id")
    @ApiModelProperty(value = "创建人id", position = 1000)
    private String createdId;

    @TableField("created_name")
    @ApiModelProperty(value = "创建人名称", position = 1001)
    private String createdName;

    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", position = 1002)
    private Date createdTime;

    @TableField("updated_id")
    @ApiModelProperty(value = "更新人id", position = 1003)
    private String updatedId;

    @TableField("updated_name")
    @ApiModelProperty(value = "更新人名称", position = 1004)
    private String updatedName;

    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后更新时间", position = 1005)
    private Date updatedTime;

    @TableField("invalid")
    @ApiModelProperty(value = "是否有效，【0:有效，1:无效】", position = 1006)
    private Integer invalid;

    @TableField("status")
    @ApiModelProperty(value = "数据状态，【0:保存，1:提交】", position = 1007)
    private Integer status;

    @TableField("version_id")
    @ApiModelProperty(value = "版本id", position = 1008)
    private Integer versionId;

    @TableField("origin")
    @ApiModelProperty(value = "数据来源", position = 1009)
    private String origin;


}
